#-------------------------------------------------------#
#   Quality Assessment of the Academic Freedom Index    #
#-------------------------------------------------------#
# Title: "Quality Assessment of the Academic Freedom Index: Strengths, Weaknesses, and How Best to Use It"
# Authors: "Lott, Lars", "Spannagel, Janika"
# date: 2024-09-19
# journal: Perspectives on Politics
# DOI: TBA
# written under "R and RStudio (4.4.1)"
#### Preliminaries ####
R.version$version.string
# clear workspace
rm(list=ls())
# load packages
library(here)
library(tidyverse)
library(magrittr)
library(reshape2)
library(ggpubr)
library(countrycode)
library(ggrepel)
library(ggthemes)
library(lubridate)
library(estimatr)
library(texreg)
library(readxl)
library(haven)
library(scales)
library(marginaleffects)
set.seed(1234)
v2cafres <-
list.files(path = "data/vdem_v14/coder_scores_post_mm/v2cafres", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("data/vdem_v14/coder_scores_post_mm/v2cafres/",.)) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
1+1
v2cafexch <-
list.files(path = "data/vdem_v14/coder_scores_post_mm/v2cafexch", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("data/vdem_v14/coder_scores_post_mm/v2cafexch/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
v2cafres <-
list.files(path = "data/vdem_v14/coder_scores_post_mm/v2cafres", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("data/vdem_v14/coder_scores_post_mm/v2cafres/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
v2cafexch <-
list.files(path = "data/vdem_v14/coder_scores_post_mm/v2cafexch", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("data/vdem_v14/coder_scores_post_mm/v2cafexch/",.)))
getwd()
v2cafexch <-
list.files(path = "../data/vdem_v14/coder_scores_post_mm/v2cafexch", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("../data/vdem_v14/coder_scores_post_mm/v2cafexch/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
v2cafexch <-
list.files(path = "../data/vdem_v14/coder_scores_post_mm/v2cafexch", pattern = "\\.csv$") %>%
map_df(~read.csv(paste0("../data/vdem_v14/coder_scores_post_mm/v2cafexch/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
v2cafres <-
list.files(path = "../data/vdem_v14/coder_scores_post_mm/v2cafres", pattern = "\\.csv$") %>%
map_df(~read.csv(paste0("../data/vdem_v14/coder_scores_post_mm/v2cafres/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
v2cafexch <-
list.files(path = "../data/vdem_v14/coder_scores_post_mm/v2cafexch", pattern = "\\.csv$") %>%
map_df(~read_csv(paste0("../data/vdem_v14/coder_scores_post_mm/v2cafexch/",.))) %>%
dplyr::filter(coder_id %in% c("coder_joined")) %>%
dplyr::select(-c(mean, priors, z, osp))
1+1
# clear workspace
rm(list=ls())
